"""
@creative_time = 2025/10/18 16:15
"""


class BankAccount:
    def __init__(self, a):
        self.account_holder = a
        self.balance = 0

    def deposit(self, amount):
        self.balance += amount
        print(f"成功存款:{amount},当前余额:{self.balance}")

    def withdraw(self, amount):
        if self.balance >= amount:
            self.balance -= amount
            print(f"成功取款{amount}元,当前余额{self.balance}")
        else:
            print(f"取款失败!余额不足.当前余额:{self.balance}")

    def get_balance(self):
        print(f"账户余额{self.balance}")


account1 = BankAccount(0)

account1.deposit(1000)
account1.withdraw(500)
account1.get_balance()
